export const formConfig = [
    {
        name: 'device_name',
        type: 'input',
        placeholder: '设备名称',
    },
    {
        name: 'sensor_name',
        type: 'input',
        placeholder: '测点名称',
    },
    {
        name: 'algorithm_group_id',
        type: 'select',
        placeholder: '算法模型组',
        options: [],
    },
]

export const column = [
    {
        name: 'selection',
    },
    {
        label: '设备名称',
        name: 'device_name',
    },
    {
        label: '测点名称',
        name: 'sensor_name',
    },
    {
        label: '模型组名称',
        name: 'name',
    },
    {
        label: '模型代码',
        name: 'm_code',
    },
    {
        label: '模型名称',
        name: 'm_name',
    },
    {
        label: '是否启用',
        name: 'is_enable',
        format: (val) => (val ? '启用' : '未启用'),
    },
    {
        title: '操作',
        name: 'action',
        width: '260',
        buttons: [],
    },
]

export const config = [
    // {
    //     label: '选择设备',
    //     type: 'device',
    //     name: 'device',
    //     required: true,
    // },
    {
        name: 'address',
        type: 'cascader',
        placeholder: '选择所属区域',
        label: '所属区域',
        checkStrictly: true,
        required: true,
    },
    {
        label: '选择测点',
        type: 'select',
        name: 'sensor_id',
        multiple: true,
        required: true,
        options: [],
    },
    {
        label: '算法模型组',
        type: 'select',
        name: 'algorithm_group_id',
        required: true,
        options: [],
    },
    {
        name: 'is_enable',
        type: 'switch',
        options: {
            active: { text: '启用', value: 1 },
            inactive: { text: '不启用', value: 0 },
        },
        label: '是否启用',
        required: true,
    },
]

export const config1 = [
    {
        label: '选择模型',
        type: 'select',
        name: 'model',
        required: true,
        options: [],
    },
    {
        name: 'm_type',
        type: 'input',
        label: '模型类型',
        required: true,
        group: '模型配置',
        disable: () => true,
    },
    {
        name: 'm_d',
        type: 'input',
        label: '模型大类',
        required: true,
        group: '模型配置',
        disable: () => true,
    },
    {
        name: 'm_d_code',
        type: 'input',
        label: '模型大类编码',
        required: true,
        group: '模型配置',
        disable: () => true,
    },
    {
        name: 'm_m',
        type: 'input',
        label: '模型小类',
        required: true,
        group: '模型配置',
        disable: () => true,
    },
    {
        name: 'm_m_code',
        type: 'input',
        label: '模型小类编码',
        required: true,
        group: '模型配置',
        disable: () => true,
    },
    {
        name: 'm_desc',
        type: 'input',
        label: '模型描述',
        required: true,
        group: '模型配置',
        disable: () => true,
    },
    {
        name: 'm_version',
        type: 'input',
        label: '模型版本',
        required: true,
        group: '模型配置',
        disable: () => true,
    },
]
